package homework.valid.validators.parser;

public abstract class ValueParser {

    private String message;

    public ValueParser() {
        message = null;
    }

    public ValueParser(String msg) {
        message = msg;
    }

    public abstract Object parse(Object v) throws Exception;

    /**
     * @return parse抛出异常时的提示消息
     */
    public String getMessage() {
        return message;
    }
}
